<div id="main">
    <div id="contents">
        <form method="post" action="#" name="filters">
            <fieldset>
                <legend>
                    <label sid="ivr_menu.encrypt"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                        <tr id="tr169">
                            <td class="frame_tab_left">
                                <span id="img169" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="encrypt.td2"></label>
                                </label>
                            </td>
                            <td id="td169" class="frame_tab_right">
                                <select name="id169">
                                    <option value="0" sid="encrypt.select_option1"></option>
                                    <option value="1" sid="encrypt.select_option2"></option>
                                    <option value="2" sid="encrypt.select_option3"></option>
                                    <option value="3" sid="encrypt.select_option4"></option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class="frame_tab_left">
                                <label>
                                    <label sid="encrypt.td1"></label>
                                </label>
                            </td>
                            <td class="frame_tab_right">
                                <input type="checkbox" onclick="read();" name="id168">
                     <span id="tr-type" style="padding-left:20px;">
                  <input type="radio" value="0" name="id502">
                   <label sid="encrypt.radio1"></label>

                  <span style="padding-left:3em;">&nbsp;</span>
                  <input type="radio" value="1" name="id502">
                  <label sid="encrypt.radio2"></label>

                          </span>
                            </td>
                        </tr>
                        <tr id="tr171">
                            <td class="frame_tab_left">
                                <span id="img171" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="encrypt.td3"></label>
                                </label>
                            </td>
                            <td id="td171" class="frame_tab_right">
                                <select onchange="read();" name="id171">
                                    <option value="2" sid="encrypt.param4_select_option1"></option>
                                    <option value="3" sid="encrypt.param4_select_option2"></option>
                                    <option value="6" sid="encrypt.param4_select_option3"></option>
                                    <option value="7" sid="encrypt.param4_select_option4"></option>
                                    <option value="8" sid="encrypt.param4_select_option5"></option>
                                    <option value="10" sid="encrypt.param4_select_option6"></option>
                                    <option value="14" sid="encrypt.param4_select_option8"></option>
                                    <option value="16" sid="encrypt.param4_select_option11"></option>
                                    <option value="17" sid="encrypt.param4_select_option9"></option>
                                    <option value="18" sid="encrypt.param4_select_option12"></option>
                                    <option value="19" sid="encrypt.param4_select_option13"></option>
                                    <option value="20" sid="encrypt.param4_select_option10"></option>
                                </select>
                            </td>
                        </tr>
                        <tr id="tr167">
                            <td class="frame_tab_left">
                                <span id="img167" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="encrypt.td4"></label>
                                </label>
                            </td>
                            <td id="td167" class="frame_tab_right">
                                <input id="id167" type="password" name="id167">
                                <span id="msg167">&nbsp;</span>
                            </td>
                        </tr>
                     <!--   <tr>
                            <td class="frame_tab_left">
                                <span>&nbsp;</span>
                                <label>
                                    <label sid="encrypt.td5"></label>
                                </label>
                            </td>
                            <td class="frame_tab_right">
                                <input type="checkbox" name="id170">
                            </td>
                        </tr>-->
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset id="sbc">
                <legend>
                    <label sid="sysoptional.table1_title"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                        <tr id="tr172">
                            <td class="frame_tab_left">
                                <span id="img172" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="sysoptional.table1_td1"></label>
                                </label>
                            </td>
                            <td id="td172" class="frame_tab_right">
                                <input id="id172" type="text" name="id172">
                                <span id="msg172">&nbsp;</span>
                            </td>
                        </tr>
                        <tr id="tr173">
                            <td class="frame_tab_left">
                                <span id="img173" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="sysoptional.table1_td2"></label>
                                </label>
                            </td>
                            <td id="td173" class="frame_tab_right">
                                <input id="id173" type="text" name="id173">
                                <span id="msg173">&nbsp;</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset id="vos">
                <legend>
                    <label sid="encrypt.param6"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                        <tr id="tr482">
                            <td class="frame_tab_left">
                                <span id="img482" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="encrypt.param7"></label>
                                </label>
                            </td>
                            <td id="td482" class="frame_tab_right">
                                <input type="text" name="id482">
                                <span id="msg482">&nbsp;</span>
                            </td>
                        </tr>
                        <tr id="tr483">
                            <td class="frame_tab_left">
                                <span id="img483" class="errormsg">&nbsp;</span>
                                <label>
                                    <label sid="encrypt.param8"></label>
                                </label>
                            </td>
                            <td id="td483" class="frame_tab_right">
                                <input type="password" name="id483">
                                <span id="msg483">&nbsp;</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <div class="submitFooter">
                <script type="text/javascript">
                    var buttonInfo = submitFooterButton(1,0);
                    $(".submitFooter").html(buttonInfo);
                </script>
            </div>
        </form>
    </div>
</div>
<br>
<div id="helpContainer">
    <div id="help">
        <div>
            <h2>
                <label sid="share.help"></label>
            </h2>
        </div>
        <div id="helpBody">
            <dl>

                <dt class="term">
                    <label sid="sysoptional.table1_td1"></label>
                </dt>
                <dd class="definition">
                    <label sid="sysoptional.table1_td1Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="sysoptional.table1_td2"></label>
                </dt>
                <dd class="definition">
                    <label sid="sysoptional.table1_td2Tip"></label>
                </dd>


            </dl>

        </div>
    </div>
</div>

<script type="text/javascript">
    if(typeof(sysoptional.table1_td1Tip)=="undefined"){
        $("#contents").attr("id","contents_stat");
        $("#helpContainer").hide();
    }
    $(document).ready(function(){

        var nonames = new Array("submit");
        var sendtext = getSendText(nonames);
        DataRequest("get_json", sendtext, function (data) {
            getResult(nonames, data);
            read();
        });


        $("[name=submit]").click(function () {
            $(".errormsg").html('');
            var settext = getSetText(nonames);
            settext = settext.replace(/\#/g, "%23");
            submitform(modules["set_data"], settext);
        });
    });


    function read() {
        if ($("[name=id168]").attr("checked")) {
            $("#tr171").attr("disabled", false);
            $("[name=id171]").attr("disabled", false);
            $("#tr-type").attr("disabled", false);
            $("[name=id502]").attr("disabled", false);
        } else {
            $("#tr171").attr("disabled", true);
            $("[name=id171]").attr("disabled", true);
            $("#tr-type").attr("disabled", true);
            $("[name=id502]").attr("disabled", true);
        }
        if ($("[name=id171]").val() == "2" || $("[name=id171]").val() == "3" || $("[name=id171]").val() == "6" || $("[name=id171]").val() == "7") {
            $("#tr172").show();
            $("#tr173").show();
            $("#sbc").show();
            $("#vos").hide();
            $("#tr482").hide();
            $("#tr483").hide();
            $("#vos").hide();
        } else if ($("[name=id171]").val() == "20") {
            $("[name=id172]").attr("value", "");
            $("[name=id173]").attr("value", "");
            $("#tr172").hide();
            $("#tr173").hide();
            $("#sbc").hide();
            $("#sbc").hide();
            $("#vos").show();
            $("#tr482").show();
            $("#tr483").show();
            $("#vos").show();
        } else {
            $("[name=id172]").attr("value", "");
            $("[name=id173]").attr("value", "");
            $("#tr172").hide();
            $("#tr173").hide();
            $("#sbc").hide();
            $("#sbc").hide();
            $("#vos").hide();
            $("#tr482").hide();
            $("#tr483").hide();
            $("#vos").hide();
        }
    }
</script>
